package cn.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import cn.itcast.crm.domain.Customer;

//@Produces("/")
public interface ICustomerService {

	//查询所有未关联的客户
	@Path("/noassociationcustomers")
	@GET
	@Produces({"application/xml","application/json"})
	public List<Customer> findNoAssociationCustomers();
	
	//查询所有已关联定区的客户
	@Path("/associationcustomers/{fixedAreaId}")
	@GET
	@Produces({"application/xml","application/json"})
	public List<Customer> findAllAssociationCustomers(
			@PathParam("fixedAreaId") String fixedAreaId);
	
	//将客户关联到定区
	@Path("/associationcustomerstofixedarea")
	@PUT
	public void associationCustomersToFixedArea(
			@QueryParam("customerIdStr") String customerIdStr,
			@QueryParam("fixedAreaId") String fixedAreaId);
	
	//保存客户
	@Path("/customer")
	@POST
	@Consumes({"application/xml","application/json"})
	public void regist(Customer customer);
	
}
